home *** CD-ROM | disk | FTP | other *** search
/ Sports Illustrated for Kids - Awesome Athletes! / Sports Illustrated for Kids - Awesome Athletes!.iso / iv.dir / 00012_my utilities.ls < prev    next >
Encoding:
Text File  |  1996-04-19  |  1.3 KB  |  64 lines

  1. on PlayAnim _spriteChan, _startCast, _num, _dir
  2.   MessagePut("play anim, start cast:" && _startCast)
  3.   DisableIdleAnim()
  4.   if _dir = 1 then
  5.     repeat with N = 1 to _num
  6.       set the castNum of sprite _spriteChan to the number of cast _startCast + N - 1
  7.       updateStage()
  8.     end repeat
  9.   else
  10.     repeat with N = 1 to _num
  11.       set j to _num - N + 1
  12.       set the castNum of sprite _spriteChan to the number of cast _startCast + j - 1
  13.       updateStage()
  14.     end repeat
  15.   end if
  16.   EnableIdleAnim(46, 47)
  17. end
  18.  
  19. on MessagePut aString
  20.   put aString
  21. end
  22.  
  23. on wait aTicks
  24.   set stopTime to aTicks + the ticks
  25.   repeat while the ticks < stopTime
  26.     if the mouseDown then
  27.       dontPassEvent()
  28.       exit
  29.     end if
  30.   end repeat
  31. end
  32.  
  33. on PlaySoundWait castNam
  34.   MessagePut("playing sound " && castNam)
  35.   puppetSound(castNam)
  36.   repeat while soundBusy(1)
  37.     nothing()
  38.   end repeat
  39. end
  40.  
  41. on GetAthleteIDFromClip
  42.   set _str to GetClipID(1)
  43.   set tmp to char 3 to 5 of _str
  44.   return tmp
  45. end
  46.  
  47. on Pad str
  48.   set spaces to 33 - integer(length(str) / 2)
  49.   repeat with I = 1 to spaces
  50.     put " " before str
  51.   end repeat
  52.   return str
  53. end
  54.  
  55. on Box I
  56.   put the locH of sprite I && the locV of sprite I
  57. end
  58.  
  59. on foo frum, tu
  60.   repeat with I = frum to tu
  61.     put I & ":" && the width of cast I && the height of cast I
  62.   end repeat
  63. end
  64.